package model

import "time"

type Message struct {
	Id        uint      `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	Message   string    `gorm:"column:message;type:varchar(255);not null;" json:"message"`
	ToUserId  uint      `gorm:"column:to_user_id;type:bigint(20);not null;" json:"to_user_id"`
	CreatedAt time.Time `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
}

func (m *Message) TableName() string {
	return "message"
}
